@extends('layouts.app')

@section('content')
    <br>

    <div class="auth-page-view">
        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-md-4 col-md-offset-4">

                    <form class="register-form" role="form" method="POST" action="{{ url('/register') }}">
                        {{ csrf_field() }}

                        <div class="form-header page-header text-center">
                            <h3>注册</h3>
                        </div>

                        <div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">

                            <input id="name" type="text" class="form-control" placeholder="姓名"
                                   name="name" value="{{ old('name') }}"
                                   autofocus>

                            @if ($errors->has('name'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('name') }}</strong>
                                </span>
                            @endif
                        </div>

                        <div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">

                            <input id="email" type="email" class="form-control" placeholder="邮箱"
                                   name="email" value="{{ old('email') }}">

                            @if ($errors->has('email'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('email') }}</strong>
                                </span>
                            @endif
                        </div>

                        <div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">

                            <input id="password" type="password" class="form-control" placeholder="密码"
                                   name="password">

                            @if ($errors->has('password'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('password') }}</strong>
                                </span>
                            @endif
                        </div>

                        <div class="form-group {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">

                            <input id="password-confirm" type="password" class="form-control" placeholder="确认密码"
                                   name="password_confirmation">

                            @if ($errors->has('password_confirmation'))
                                <span class="help-block">
                                    <strong>{{ $errors->first('password_confirmation') }}</strong>
                                </span>
                            @endif
                        </div>

                        <div class="form-group">
                            <button type="submit" class="btn btn-primary btn-block btn-submit">注册</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
